<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="../include/admincontent.jsp" %>
<div style="min-width: 1500px">
    <div id="location">当前位置：招聘实施管理 > 招聘方案管理 > 添加招聘方案</div>
    <div id="Content">

        <form class="layui-form layui-form-pane" action="" style="padding:0; margin: 0;" lay-filter="projectForm"
              id="projectForm">
            <%--      <div class="btnbar">
                      <button type="button" lay-submit="" lay-filter="btn_project_save" class="save" id="btn_project_save">保 存</button>
                      <button type="button" class="back" onclick="javascript:history.go(-1);">返 回</button>
                  </div>--%>

            <div class="toolbars" style="height:30px;white-space:nowrap;width:auto;margin-left: 20px;" totalwidth="314">
                <a id="btn_project_save">
                    <em class="ico16 save_traft_16"></em>
                    <span class="menu_span" title="保存" lay-submit="" lay-filter="btn_project_save">保存</span>
                </a>
                <a id="btn_project_back">
                    <em class="ico16 cancle_publish_16"></em>
                    <span class="menu_span" title="返回" onclick="javascript: self.location=document.referrer;">返回</span>
                </a>
            </div>


            <div class="layui-row" style="background: #EEF1F8;padding: 15px 0px 15px 25px;margin-top:10px"><b>基本信息</b>
            </div>
            <div class="layui-row">

                <div class="layui-form-item layui-form-item-lys1" style="margin-bottom: 0px;">
                    <label class="layui-form-label">方案名称</label>
                    <div class="layui-input-block">
                        <input type="hidden" id="proid" name="proid" value="${proid}"/>
                        <input type="hidden" id="state" name="state" value="${state}"/>
                        <input type="text" name="pname" placeholder="请输入方案名称" value="${proname}" lay-verify="required"
                               autocomplete="off" class="layui-input input-lys1">
                    </div>
                </div>
                <div class="layui-form-item" pane="" style="border-top: none;margin-bottom: 0px;">
                    <label class="layui-form-label">招聘方式</label>
                    <div class="layui-input-block">
                        <input type="radio" name="recruittype" value="1" title="高校招聘" lay-filter="ptypeRadio">
                        <input type="radio" name="recruittype" value="2" title="中专招聘" lay-filter="ptypeRadio">
                        <input type="radio" name="recruittype" value="3" title="社会招聘" lay-filter="ptypeRadio">
                        <input type="radio" name="recruittype" value="4" title="内部招聘" lay-filter="ptypeRadio">
                        <input type="radio" name="recruittype" value="5" title="驾驶员招聘" lay-filter="ptypeRadio">
                    </div>
                </div>
                <div class="layui-form-item" pane="" style="border-top: none;margin-bottom: 0px;display: none;"
                     id="pSeason">
                    <label class="layui-form-label">招聘季</label>
                    <div class="layui-input-block">
                        <input type="radio" name="season" value="春季" title="春季" lay-filter="seasonRadio">
                        <input type="radio" name="season" value="秋季" title="秋季" lay-filter="seasonRadio">
                    </div>
                </div>
                <%-- <div class="layui-form-item" pane="" style="border-top: none;">
                     <label class="layui-form-label">是否显示</label>
                     <div class="layui-input-block" >
                         <input type="radio" name="pdisplay" value="是" title="前台显示"  lay-filter="pDisplayRadio" checked >
                         <input type="radio" name="pdisplay" value="否" title="前台不显示" lay-filter="pDisplayRadio">
                     </div>
                 </div>--%>
            </div>

        </form>

        <script id="flowTableHeader" type="text/html">
            <div class="layui-row" style=" margin:0px 20px;">
                <div class="layui-col-xs6" style="font-weight: bold;font-size: 14px;">
                    实施流程
                </div>
                <div class="layui-col-xs6" style="text-align:right;">
                    <a class="layui-btn layui-btn-sm blue-btn" lay-event="add" title="批量添加">批量添加</a>
                    <a class="layui-btn layui-btn-sm blue-btn" lay-event="empty" title="还原默认">还原默认</a>
                </div>
            </div>


        </script>

        <table class="layui-table" id="projectFlows" lay-filter="projectFlows">

        </table>

        <script type="text/html" id="flowTableTools">
            <div class="layui-btn-group">
                {{# if((d.fname=='简历筛选')||((d.fname=='毕业生推荐'))){ }}
                <a class="layui-btn layui-btn-container layui-btn-xs" lay-event="add" title="新增"><i
                        class="layui-icon layui-icon-add-circle"></i></a>
                <a class="layui-btn layui-btn-warm layui-btn-xs layui-btn-radius" lay-event="edit" title="编辑"><i
                        class="layui-icon layui-icon-edit"></i></a>
                {{# }else if(d.fname=='录用'){ }}
                <a class="layui-btn layui-btn-warm layui-btn-xs layui-btn-radius" lay-event="edit" title="编辑"><i
                        class="layui-icon layui-icon-edit"></i></a>
                {{# } else { }}
                <a class="layui-btn layui-btn-container layui-btn-xs" lay-event="add" title="新增"><i
                        class="layui-icon layui-icon-add-circle"></i></a>
                <a class="layui-btn layui-btn-warm layui-btn-xs layui-btn-radius" lay-event="edit" title="编辑"><i
                        class="layui-icon layui-icon-edit"></i></a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" title="删除"><i
                        class="layui-icon layui-icon-delete"></i></a>
                {{# } }}
            </div>
        </script>

        <script type="text/html" id="switchTpl">
            <input type="checkbox" name="display" value="{{ d.LAY_TABLE_INDEX }}" lay-skin="switch" lay-text="是|否"
                   lay-filter="flowDisplay" {{ d.display== '是' ? 'checked' : '' }}>
        </script>


        <script id="jobsTableHeader" type="text/html">
            <div class="layui-row" style=" margin:0px 20px;">
                <div class="layui-col-xs6" style="font-weight: bold;font-size: 14px;">
                    招聘岗位
                </div>
                <div class="layui-col-xs6" style="text-align:right;">
                    <a class="layui-btn layui-btn-sm" lay-event="add" title="新增">新增</a>
                    <a class="layui-btn layui-btn-sm" lay-event="addAll" title="批量添加">批量添加</a>
                    <a class="layui-btn layui-btn-sm" lay-event="empty" title="清空岗位">清空岗位</a>
                </div>
            </div>
        </script>
        <table class="layui-table" id="projectJobs" lay-filter="projectJobs"></table>
        <script type="text/html" id="jobsTableTools">
            <div class="layui-btn-group">
                <a class="layui-btn layui-btn-container layui-btn-xs" lay-event="add" title="新增"><i
                        class="layui-icon layui-icon-add-circle"></i></a>
                <a class="layui-btn layui-btn-warm layui-btn-xs layui-btn-radius" lay-event="edit" title="编辑"><i
                        class="layui-icon layui-icon-edit"></i></a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" title="删除"><i
                        class="layui-icon layui-icon-delete"></i></a>
            </div>
        </script>


        <style>
            .layui-table-tool {
                line-height: 50px;
                background: #EEF1F8;
                padding: 0px;
                color: #000000;
            }

            .layui-table-tool-temp {
                padding-right: 10px;
            }

            td .layui-form-select {
                margin-top: -10px;
                margin-left: -15px;
                margin-right: -15px;
            }
        </style>

        <script>
            var pname = '${proname}';
            var recruittype = '${recruittype}';
            var proid = '${proid}';
            var pdisplay = '${pdisplay}';
            var pseason = '${pseason}';
            var state = '${state}';
            var ptype;
            var firstFname;
            var seasons;


            //  $(function () {
            if (pseason) {
                $("#pSeason").show();
            }
            // });

            layui.use(['table', 'form', 'laytpl'], function () {
                var table = layui.table
                    //,dt = layui.dataTable
                    , laytpl = layui.laytpl
                    , transfer = layui.transfer
                    , $ = layui.$
                    , form = layui.form;
                form.render();
                var flowData = [];
                ptype = recruittype;
                form.val('projectForm', {
                    'pname': pname,
                    'recruittype': recruittype,
                    'pdisplay': pdisplay,
                    'season': pseason,
                    'state': state
                });
                if (!!recruittype) {
                    $('#projectForm input[name="recruittype"]').attr('disabled', 'disabled')
                }
                $.ajax({
                    url: '/Project/getProjectFlows',
                    data: {id: proid},
                    dataType: 'JSON',
                    type: 'GET',
                    success: function (json) {
                        //table.render('#projectFlows',{data:flowData.data});
                        if (json.state) {
                            if (json.datas != null) {
                                flowData = json.datas;
                                if (json.datas.length > 0) {
                                    firstFname = json.datas[0].fname;
                                }

                            }

                        } else {
                            layer.alert(json.message, {icon: 2})
                        }
                        //table.render('#projectFlows',{data:flowData.data});
                        table.render({
                            elem: '#projectFlows',
                            id: 'flowsTable',
                            data: flowData,
                            page: false,
                            toolbar: '#flowTableHeader',
                            defaultToolbar: [],
                            cols: [[{type: 'numbers', title: '序号', width: 60}
                                , {field: 'id', title: 'ID', width: 60, sort: false, hide: true}
                                , {field: 'fid', title: 'FID', width: 60, hide: true}
                                , {field: 'fname', title: '流程内容', sort: false, minWidth: 80}
                                , {field: 'nickname', title: '流程别名', minWidth: 80, edit: 'text'}
                                , {field: 'webname', title: '前端显示名称', minWidth: 80, edit: 'text'}
                                , {field: 'state', title: '流程状态', hide: true}
                                , {field: 'display', title: '是否显示', sort: false, templet: '#switchTpl', width: 90}
                                , {field: 'starttime', title: '预计开始日期', edit: 'text', minWidth: 100}
                                , {field: 'endtime', title: '预计结束日期', edit: 'text', minWidth: 100}
                                , {field: 'remark', title: '备注', sort: false, edit: 'text'}
                                , {fixed: 'right', title: '操作', width: 160, align: 'center', toolbar: '#flowTableTools'}
                            ]]
                        });
                    }
                });

                table.on('toolbar(projectFlows)', function (obj) {
                    if (obj.event == 'add') {
                        if (!!!ptype) {
                            layer.alert('请先选择招聘类型!', {icon: 2});
                        } else {
                            showFlowTransfer();
                        }
                    } else if (obj.event == 'empty') {
                        if (!!!ptype) {
                            layer.alert('请先选择招聘类型!', {icon: 2});
                        } else {
                            layer.confirm('是否还原至默认流程节点?', {icon: 3, title: '提示'}, function () {
                                table.reload('flowsTable', {data: flowData});
                                layer.closeAll();
                            });
                        }
                    }

                });

                form.on('switch(flowDisplay)', function (obj) {
                    var tablecache = table.cache['flowsTable'];
                    var ck = obj.elem.checked ? '是' : '否';
                    var changeId = this.value;
                    tablecache[this.value][this.name] = ck;
                });

                form.on('radio(ptypeRadio)', function (data) {
                    ptype = data.value;
                    //   console.log(ptype);
                    if ((ptype == 2) || (ptype == 1)) {
                        $("#pSeason").show();
                    } else {
                        seasons = null;
                        $("#pSeason").hide();
                    }
                });

                form.on('radio(seasonRadio)', function (data) {
                    seasons = data.value;
                });

                table.on('tool(projectFlows)', function (obj) {
                    var cdata = obj.data; //获取点击的数据
                    var tabledatas = table.cache['flowsTable'];
                    if ((cdata.nickname == '简历筛选' || cdata.nickname == '录用' || cdata.nickname == '毕业生推荐') && obj.event == 'edit') {
                        $('#flowselect').attr('disabled', 'disabled');
                        $('#btn_flow_reset').attr('disabled', 'disabled');
                        $('#btn_flow_reset').addClass('layui-btn-disabled');
                    } else {
                        $('#btn_flow_reset').attr('disabled', '');
                        $('#btn_flow_reset').removeClass('layui-btn-disabled');
                    }
                    switch (obj.event) {
                        case 'add':
                            showFlowForm(cdata, tabledatas, 'add');
                            form.val('flowForm', {
                                "id": ""
                                , "fid": "0" // "name": "value"
                                , "fname": firstFname
                                , "nickname": firstFname
                                , "webname": ""
                                , "display": '是'
                                , "starttime": "" //复选框选中状态
                                , "endtime": "" //开关状态
                                , "remark": ""

                            });
                            break;
                        case 'edit':
                            if (cdata.length === 0) {
                                layer.msg('请选择一行');
                            } else if (cdata.length > 1) {
                                layer.msg('只能同时编辑一个');
                            } else {
                                showFlowForm(cdata, tabledatas, 'edit');
                                form.val('flowForm', {
                                    "id": cdata.id
                                    , "fid": cdata.fid // "name": "value"
                                    , "fname": cdata.fname
                                    , "state": cdata.state
                                    , "nickname": cdata.nickname
                                    , "webname": cdata.webname
                                    , "display": cdata.display
                                    , "starttime": cdata.starttime
                                    , "endtime": cdata.endtime
                                    , "remark": cdata.remark
                                });
                            }
                            break;
                        case 'del':
                            layer.confirm('确认删除该流程节点?', {title: '提示', icon: 2}, function (index) {
                                var ckIndex = 1;
                                $.each(tabledatas, function (i, t) {
                                    if (t.fid === cdata.fid) {
                                        ckIndex = i;
                                        return;
                                    }
                                });
                                layer.close(index);
                                tabledatas.splice(ckIndex, 1);
                                table.reload('flowsTable', {data: tabledatas})
                            });
                            break;
                    }
                    ;
                });

                function showFlowForm(cdata, tabledatas, type) {
                    var title = "";
                    if (type === 'add') {
                        title = '新增流程节点';
                    } else {
                        title = '编辑流程节点';
                    }

                    var aewIndex = layer.open({
                        type: 1
                        , title: title
                        , content: $('#flowForm')
                        , skin: 'flowForm-lys'
                        , area: '530px'
                        , cancel: function () {
                            $('#flowForm').hide();
                        }
                    });
                    form.render('flowselect');
                    $("#flowselect").append("<option value=0>" + firstFname + "</option>");
                    $("#flowselect").append("<option value=1>笔试</option>");
                    $("#flowselect").append("<option value=2>资料审核</option>");
                    $("#flowselect").append("<option value=3>面试</option>");
                    $("#flowselect").append("<option value=4>背景调查</option>");
                    $("#flowselect").append("<option value=5>体检</option>");
                    $("#flowselect").append("<option value=6>录用</option>");

                    form.on('select(flowselect)', function (data) {
                        form.val('flowForm', {
                            "fname": data.elem[data.elem.selectedIndex].text
                            , "nickname": data.elem[data.elem.selectedIndex].text
                        });
                    });
                    //监听提交
                    form.on('submit(btn_flow_add)', function (formobj) {
                        if (formobj.field.display === "on") {
                            formobj.field.display = "是";
                        } else {
                            formobj.field.display = "否";
                        }
                        if (tabledatas.length > 0) {
                            var ckIndex = 1;
                            var hasFlow = false;
                            var hasIndex = 1;
                            $.each(tabledatas, function (e, t) {
                                if (t.fid === formobj.field.fid) {
                                    hasFlow = true;
                                    hasIndex = e;
                                }
                            });
                            $.each(tabledatas, function (i, t) {
                                if (t.fid === cdata.fid) {
                                    ckIndex = i;
                                    return;
                                }
                            });
                            if (type === 'add') {
                                if (hasFlow) {
                                    layer.alert('已存在该流程,请重新选择或删除后重新添加!', {icon: 5});
                                } else {
                                    tabledatas.splice(ckIndex + 1, 0, formobj.field);
                                    layer.close(aewIndex);
                                    table.cache['flowsTable'] = tabledatas;
                                    table.reload('flowsTable', {data: tabledatas});
                                    $('#flowForm').hide();
                                }
                            } else if (type === 'edit') {
                                layer.close(aewIndex);
                                table.cache['flowsTable'][ckIndex] = formobj.field;
                                table.reload('flowsTable', {data: tabledatas});
                            }


                        }
                        return false;
                    });
                }

                function showFlowTransfer() {
                    var recruittypeVal = $('#projectForm input[name="recruittype"]').val();
                    var ftwIndex = layer.open({
                        type: 2
                        , title: '流程节点批量添加'
                        , content: 'flowTransfer.html?ptype=' + ptype
                        //  ,area: ['30%','50%']
                        , area: ['650px', '600px']
                    });
                }

                <!--流程节点相关操作 end-->

                <!--招聘岗位相关操作 start-->
                $.ajax({
                    url: '/Project/getProjectJobs',
                    dataType: 'JSON',
                    data: {id: proid},
                    type: 'GET',
                    success: function (json) {
                        var jobsData = [];
                        //table.render('#projectFlows',{data:flowData.data});
                        if (json.state) {
                            if (json.datas != null) {
                                jobsData = json.datas;
                            }
                        } else {
                            layer.alert(json.message, {icon: 2})
                        }
                        table.render({
                            elem: '#projectJobs',
                            id: 'jobsTable',
                            data: jobsData,
                            page: false,
                            limit: 100,
                            toolbar: '#jobsTableHeader',
                            defaultToolbar: [],
                            cols: [[{type: 'numbers', title: '序号', width: 60}
                                , {field: 'id', title: 'ID', width: 60, sort: false, hide: true}
                                , {field: 'pid', title: 'PID', width: 60, hide: true}
                                , {field: 'jobdepart', title: '招聘部门', sort: false, width: 100}
                                , {field: 'jobname', title: '岗位名称', sort: false, width: 100}
                                , {field: 'zpcount', title: '招聘人数', minWidth: 80}
                                , {field: 'educode', title: '学历编码', sort: false, hide: true}
                                , {field: 'eduname', title: '学历要求', sort: false}
                                , {field: 'major', title: '专业要求', sort: false, minWidth: 120}
                                , {field: 'workreq', title: '资格条件', minWidth: 150,}
                                , {field: 'workcont', title: '工作内容', sort: false, minWidth: 120}
                                , {field: 'height', title: '身高(CM)', width: 80}
                                , {field: 'gender', title: '性别', sort: false, width: 80}
                                , {field: 'vision', title: '视力', sort: false, width: 80}
                                , {field: 'workyear', title: '工作年限', sort: false, width: 80}
                                , {field: 'agef', title: '年龄', sort: false, templet: '#jobsAgeTpl'}
                                , {field: 'aget', title: '年龄', sort: false, hide: true}
                                , {field: 'display', title: '是否显示', sort: false, hide: false}
                                , {field: 'istemplate', title: '是否模版', sort: false, hide: false}
                                , {fixed: 'right', title: '操作', width: 160, align: 'center', toolbar: '#jobsTableTools'}
                            ]]
                        });
                    }
                });
                table.on('toolbar(projectJobs)', function (obj) {
                    if (obj.event === 'add') {
                        if (!!!ptype) {
                            layer.alert('请先选择招聘类型!', {icon: 2});
                        } else {
                            var ftwIndex = layer.open({
                                type: 2
                                , title: '新增招聘岗位'
                                , content: 'jobsForm.html?ptype=' + ptype + '&season=' + seasons
                                , area: ['95%', '85%']
                            });
                        }
                    } else if (obj.event === 'empty') {
                        layer.confirm('是否清空所有招聘岗位?', {icon: 3, title: '提示'}, function () {
                            table.cache['jobsTable'] = [];
                            table.reload('jobsTable', {data: []});
                            layer.closeAll();
                        });
                    } else if (obj.event === 'addAll') {
                        if (!!!ptype) {
                            layer.alert('请先选择招聘类型!', {icon: 2});
                        } else {
                            var ftwIndex = layer.open({
                                type: 2
                                , title: '流程节点批量添加'
                                , content: 'jobsTransfer.html?ptype=' + ptype
                                , area: ['1000px', '600px']
                            });
                        }
                    }

                });

                table.on('tool(projectJobs)', function (obj) {
                    var cdata = obj.data;
                    var tabledatas = table.cache['jobsTable'];
                    switch (obj.event) {
                        case 'add':
                            if (!!!ptype) {
                                layer.msg('请先选择招聘类型!');
                            } else {
                                var ftwIndex = layer.open({
                                    type: 2
                                    , title: '新增招聘岗位'
                                    , content: 'jobsForm.html?ptype=' + ptype + '&season=' + seasons
                                    , area: ['95%', '85%']
                                });
                            }

                            break;
                        case 'edit':
                            var ftwIndex = layer.open({
                                type: 2
                                , title: '编辑招聘岗位'
                                , content: 'jobsForm.html?ptype=' + ptype + '&season=' + seasons
                                , area: ['95%', '85%']
                                , success: function (layero, index) {
                                    var body = layer.getChildFrame('body', index);
                                    var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                                    //var childFrame= document.getChildFrame('jobsForm.html');

                                    iframeWin.editData = cdata;

                                }
                            });
                            break;
                        case 'del':
                            layer.confirm('确认删除该岗位?', {title: '提示', icon: 2}, function (index) {
                                var ckIndex = 1;
                                $.each(tabledatas, function (i, t) {
                                    if (t.jobname == cdata.jobname) {
                                        ckIndex = i;
                                        return;
                                    }
                                });
                                layer.close(index);
                                tabledatas.splice(ckIndex, 1);
                                table.reload('jobsTable', {data: tabledatas})
                            });
                            break;
                    }
                    ;
                });

                form.on('submit(btn_project_save)', function (data) {
                    var projectFlows = table.cache['flowsTable'];
                    if (projectFlows.length < 1) {
                        layui.use(['layer', 'form'], function () {
                            layer.msg("实施流程不能为空!", {icon: 2, time: 2000});
                        });
                    } else {
                        var projectJobs = table.cache['jobsTable'];
                        var formData = data.field;
                        var params = {
                            id: formData.proid,
                            pname: formData.pname,
                            state: formData.state,
                            recruittype: formData.recruittype,
                            pdisplay: formData.pdisplay,
                            season: formData.season,
                            flowsJson: JSON.stringify(projectFlows),
                            jobsJson: JSON.stringify(projectJobs)
                        };
                        /*if (formData.recruittype === 2) {
                            params['season'] = formData.season;
                        }*/
                        $.ajax({
                            url: '/Project/AddAction'
                            , data: params
                            , type: 'POST'
                            , dataType: 'JSON'
                            , success: function (json) {
                                if (json.state) {
                                    //  $.Showmsg(json.Message);
                                    //   parent.layer.msg(data.Message,{icon:1,time:1000});
                                    layui.use(['layer', 'form'], function () {
                                        //  console.log(data);
                                        layer.msg(json.Message, {icon: 1, time: 2000});
                                    });
                                    setTimeout(function () {
                                        //javascript: history.go(-1);
                                        javascript: self.location = document.referrer;
                                    }, 2000);
                                } else {
                                    // parent.layer.msg(data.Message,{icon:2,time:1000});
                                    layui.use(['layer', 'form'], function () {
                                        layer.msg(json.Message, {icon: 2});
                                    });
                                    //   $.Showmsg(json.Message);
                                }
                            }
                        });
                    }
                    return false;
                });

            });

            function jobsAgeTpl(d) {
                var str;
                if ((d.agef != null) && (d.aget != null)) {
                    str = d.agef + '-' + d.aget;
                }
                return str;
            }
        </script>

    </div>
</div>
<%--<script type="text/html" id="jobsAgeTpl">
      {{d.agef}}-{{d.aget}}
</script>--%>

<form class="layui-form layui-form-pane" action="" hidden style="display: none;padding:10px" lay-filter="flowForm"
      id="flowForm">
    <div class="layui-form-item">
        <label class="layui-form-label">流程内容</label>
        <div class="layui-input-block">
            <input type="hidden" name="id"/>
            <input type="hidden" name="fname"/>
            <select name="fid" lay-filter="flowselect" id="flowselect">
                <option value=""></option>
                <%--                <option value="0">简历筛选</option>
                                <option value="1">笔试</option>
                                <option value="2">资料审核</option>
                                <option value="3">面试</option>
                                <option value="4">背景调查</option>
                                <option value="5">体检</option>
                                <option value="6">录用</option>--%>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">流程别名</label>
        <div class="layui-input-block">
            <input type="text" name="nickname" lay-verify="title" autocomplete="off" placeholder="请输入流程别名"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">前端显示名称</label>
        <div class="layui-input-block">
            <input type="text" name="webname" lay-verify="title" autocomplete="off" placeholder="请输入流程别名"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item" pane>
        <label class="layui-form-label">是否显示</label>
        <div class="layui-input-block">
            <input type="checkbox" name="display" lay-skin="switch" lay-text="是|否">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" title="预计开始日期">预计开始日期</label>
        <%--   <div class="layui-input-block">
               <input type="text" name="starttime" lay-verify="title" autocomplete="off" placeholder="请输入预计开始日期" class="layui-input">
           </div>--%>
        <div class="layui-input-block">
            <input type="text" name="starttime" lay-verify="title" autocomplete="off" placeholder="请输入预计开始日期"
                   class="layui-input"
                   onclick="laydate({istime: false, format: 'YYYY-MM-DD',min:'${today}'})">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" title="预计结束日期">预计结束日期</label>
        <%--  <div class="layui-input-block">
              <input type="text" name="endtme" lay-verify="title" autocomplete="off" placeholder="请输入预计结束日期" class="layui-input">
          </div>--%>
        <div class="layui-input-block">
            <input type="text" name="endtme" lay-verify="title" autocomplete="off" placeholder="请输入预计结束日期"
                   class="layui-input"
                   onclick="laydate({istime: false, format: 'YYYY-MM-DD',min:'${today}'})">
        </div>
    </div>


    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入内容" class="layui-textarea" name="remark"></textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="btn_flow_add">保存</button>
            <button type="reset" class="layui-btn layui-btn-primary" id="btn_flow_reset">重置</button>
        </div>
    </div>
</form>
</body>
</html>


